package com.jack.design_patterns.structural.decorator.define;

/**
 * 抽象装饰角色: 实现或者继承抽象构件
 */
public abstract class Decorator implements Component {

    private final Component component;

    /**
     * 通过构造方法传递进来被装饰者
     * @param component
     */
    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        this.component.operation();
    }
}
